Skip to content

Expose ORC calendar controls through Java and JNI - #25123

Draft
wjxiz1992 wants to merge 8 commits into
NVIDIA:mainfrom
wjxiz1992:codex/orc-calendar-java-23794
Draft

wjxiz1992 wants to merge 8 commits into
NVIDIA:mainfrom
wjxiz1992:codex/orc-calendar-java-23794

Conversation

@wjxiz1992

@wjxiz1992 wjxiz1992 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Depends on #24733. Closes #23794. Java-only review diff (7 files).

Expose the ORC calendar controls from #24733 through Java and JNI. Writers can select proleptic Gregorian or legacy DATE encoding, and readers can opt into converting legacy DATE values to proleptic dates. Reader conversion remains disabled by default for callers that already perform their own rebasing; writer defaults match the C++ parent.

Java API and nested DATE roundtrip tests remain in the standard test source root consumed by downstream JNI builds. Apache ORC interoperability tests run automatically from a separate source root in cuDF's Java build, keeping their additional test dependencies out of the independent JNI build. Both the C++ intermediate and the combined version passed cudf-spark ORC validation on Spark 3.5.4 and 4.0.0; detailed results are linked from #24733.

Prepared with OpenAI Codex assistance.

Draft status

This Draft targets main and depends on #24733. Until the parent merges, GitHub's full PR diff also includes the parent C++ changes; use the Java-only comparison above for this review. Before marking it ready:

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Record the standard calendar field for one-shot and chunked writers,
expose it through ORC metadata, and add matching C++ and Java/JNI options.
Reject unsupported legacy output rather than mislabeling proleptic data.

Encode DATE statistics using DateStatistics instead of IntegerStatistics.
Cover historical and nested dates, nulls, empty input, calendar defaults,
and Apache ORC interoperability through both JNI sink paths.

Contributes to NVIDIA#23794.

Signed-off-by: Allen Xu <allxu@nvidia.com>
Rebase DATE leaves before encoding and statistics, and add opt-in conversion when reading explicitly marked hybrid files. Keep raw reader behavior for existing callers, and reject lossy dates and legacy TIMESTAMP schemas. Cover nested slices, hidden nulls, mixed calendars, retries, wide dates, and Apache ORC interoperability.

Signed-off-by: Allen Xu <allxu@nvidia.com>
Preserve unknown protobuf calendar values and make shared decode errors
sticky across columns. Bound legacy DATE scratch memory to written slices,
skip empty nested ranges, and retain compacted column ownership through
statistics persistence. Compact top-level DATE slices before device-view
construction to avoid duplicate setup in chunked writes.

Cover raw enum values, decoder overflow state, bounded slice allocations,
nested DATE statistics, and indexed reading. Clarify calendar constants and
parameter documentation.

Contributes to NVIDIA#23794.

Signed-off-by: Allen Xu <allxu@nvidia.com>
Signed-off-by: Allen Xu <allxu@nvidia.com>
Signed-off-by: Allen Xu <allxu@nvidia.com>
Signed-off-by: Allen Xu <allxu@nvidia.com>
Signed-off-by: Allen Xu <allxu@nvidia.com>
Signed-off-by: Allen Xu <allxu@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Java Affects Java cuDF API. label Nov 6, 2026
@wjxiz1992 wjxiz1992 added cuIO cuIO issue feature request New feature or request non-breaking Non-breaking change labels Nov 6, 2026 — with ChatGPT Codex Connector
@wjxiz1992
wjxiz1992 changed the base branch from codex/orc-calendar-cpp-23794 to main November 6, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuIO cuIO issue feature request New feature or request Java Affects Java cuDF API. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] ORC writer: persist Gregorian calendar mode in the file footer

1 participant